package com.css.common.security.enums;

import com.css.common.security.constant.SecurityConstants;

/**
 * ValidateCodeType
 * 校验码类型
 *
 * @author hanyx
 * @date 2019/04/12
 */
public enum ValidateCodeType {

    SMS{
        @Override
        public String getParamNameOnValidate() {
            return SecurityConstants.DEFAULT_PARAMETER_NAME_CODE_SMS;
        }
    },
    IMAGE {
        @Override
        public String getParamNameOnValidate() {
            return SecurityConstants.DEFAULT_PARAMETER_NAME_CODE_IMAGE;
        }
    };

    /**
     * 校验时从请求中获取的参数的名字
     * @return
     */
    public abstract String getParamNameOnValidate();
}
